import request from '@/utils/request'
export default {

    createPoint: function (data) {
        try {
            return request({
                url: '/point/createPoint',
                method: 'post',
                data: data
            })
        } catch (error) {
            
        }
        
    },
    getTableNameForPath(path) {
        let tableObj = [
            { name: "football", list: ["/vesync/advertisePage", "/club/footballApply"] },
            { name: "food", list: ["/food","/vesync/food", "/vesync/publish"] },
            { name: "club", list: ["/club/activityList","/club/club"] },
            { name: "person", list: ["/person-center/setting"] },
        ]
        let name = ""
        tableObj.forEach(item=>{
            item.list.forEach(info=>{
                if(info === path){
                    name = item.name
                }
            })
        })
        return name;
    }
}